//------------------------------------------------------------------------------
void IP_PORT(char *name, int p_id, char ip[2][STRING_LENGTH], char port[2][STRING_LENGTH])
{
	char line[STRING_LENGTH];
	char colon=':';
	int counter=0,i,index;
	bool colonFound=false;
	FILE *fp;
	//-------------------Get IP_MULTICAST port and IP---------------------------
	if((fp=fopen(name,"r"))==NULL)
	  {
		  perror("Configuration reading:");
		  exit(1);	  
	  }
	while(!feof(fp))
	  {
		  
		  fgets(line,STRING_LENGTH,fp);	
		  if(line[0]=='M')
			  break;	  
	  }
	counter=0;
	colonFound=false;
	for(i=2;i<(strlen(line)-1);i++)
	  {
		  if(colonFound)
			  break;
		  if(line[i]!=colon)
			{
				ip[0][counter]=line[i];
				counter++;
			}
		  else
			{
				colonFound=true;
				index=i;
				break;
			}
	  }
	counter=0;
	colonFound=false;
	for(i=index+1;i<(strlen(line)-1);i++)
	  {
		  port[0][counter]=line[i];
		  counter++;
	  }	
    //-------------------Get Acceptore port and IP------------------------------
	if((fp=fopen(name,"r"))==NULL)
	  {
		  perror("Configuration reading:");
		  exit(1);	  
	  }
	while(!feof(fp))
	  {
		  
		  fgets(line,STRING_LENGTH,fp);

		  if(line[0]=='l' && atoi(&line[2])==PROCESS_ID)
			{
				fprintf(","%s.\n",line);
				break;
			}
			  
	  }
//	fprintf(","%s.\n",line);
	counter=0;
	colonFound=false;
	int start=4;
	
	if(PROCESS_ID>=10)
		start=5;
	for(i=start;i<(strlen(line)-1);i++)
	  {
		  if(colonFound)
			  break;
		  if(line[i]!=colon)
			{
				ip[1][counter]=line[i];
				counter++;
			}
		  else
			{
				colonFound=true;
				index=i;
				break;
			}
	  }
	counter=0;
	colonFound=false;
	for(i=index+1;i<(strlen(line)-1);i++)
	  {
		  port[1][counter]=line[i];
		  counter++;
	  }	
    //---------------------------------------------------------------------------
	
        ip[0][10] = '\0';
	    ip[1][12]=  '\0';
  	   	
	fclose(fp);
}

